package com.example.entity;

import javax.persistence.*;

/**
 * @ClassName SeniorStudent
 * @Description
 * @Author JY
 * @Date 2020/7/26 8:26
 **/
@Entity
@Table(name="t_senStudent")
@PrimaryKeyJoinColumn(name = "id")//每个表都生成一个与父类索引对联的ID列
public class SeniorStudent extends Student{
    @Column(name = "major")
    private String major;
    @Column(name = "salary")
    private int salary;

    public SeniorStudent() {
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
}
